memory_alphafandomcom-20200223-history
Help:Magic words
A "magic word" is a symbol which is recognized by the MediaWiki software and which when seen in the non-commented text of the page, triggers the software to do something other than display that symbol, or transclude a page with that name, but instead to use the symbol directly. A magic word can be: *an upper case word, preceded and followed by two underlines "__", e.g. *an XML object, coded similar to HTML, preceded by "<" and followed by ">", e.g. ''' *a parser function: similar to a template, a word preceded by the symbols " ", and optionally parameter definitions between pipe characters, except that the part before the first pipe (or without pipes, the text between the braces) contains a colon (":"), e.g. and }>3|large|small}} *a variable: similar to a template without parameters, a word preceded by the symbols " ", except the word used is in all upper case, e.g. ''' *a template modifier *an image modifier If a page in the template namespace has the same name as a magic word, the magic word will be invoked instead. If you discover you absolutely have to define a template with the same name as a magic word, prefix the name of the template with "msg:" or the name of the template namespace ("Template:"). See below for further details if you need this feature. Magic words between double underscores Table of contents :For details see '' Other Variables :''For details see '' Time The time in UTC. Note that if the page was displayed by the same user and has not changed (has not been edited) since the last time it was displayed, it is possible that the page may be cached (by the user's browser) and the displayed time or date may not change. Also, if a heavily used page, rather than freshly rendered by the software each time it is generated, is instead being retrieved from a caching system (such as the main page on Wikipedia) the date or time may not change from the last time the page was originally retrieved by the caching hardware or software. Statistics Statistics variables give thousands separators unless ":R" for "raw" is added (actually, these versions are parser functions). Page names and related info Parser functions :''For details see . Namespaces and URLs Formatting Template modifiers Image modifiers :For details see w:en:Wikipedia:Extended image syntax. These are modifiers used in links. Some are mutually exclusive, and then the last specified wins. Size The last unrecognized modifier is used as caption for framed images or together with thumbnail''s. It's also used as description alt=''text. Position :For details see '' The positions are mutually exclusive; the last specified wins. can stop floating. For inline images, only the modifier ''px (see above) is supported. Miscellany Language-dependent word conversions "Grammar" and "Plural" are language-dependent functions, defined in http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/classes/LanguageCs.php, http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/languages/classes/LanguageRu.php, etc. (note that in PHP, the modulo operator is the percent sign). "Grammar" can either be applied to predefined words only, or to arbitrary words, depending on whether the definition is just a 2D array, or involves string manipulations. See also Wikipedia:cs:Šablona:Wikivar/GRAMMAR. See also *ParserFunctions #expr:, #if:, #ifeq:, etc. *Magic words at MediaWiki *Source for Language.php *Source for MagicWord.php References